{% extends "base.html" %}

{% block page_title %}Candidates for Election {{ title }}{% endblock %}

{% block content %}
  <h3>{{ title }}</h3>
  
  {% if canvote %}
    <form method="post">
    <ul class="undecorated_stack">
    {% for candidate in candidates %}
        <li>
          <input type="radio" id="radio_{{ candidate.id }}" name="candidate" value="{{ candidate.id }}" />
          <label for="radio_{{ candidate.id }}">{{ candidate.name }}</label>
        </li>
    {% endfor %}
      <li>
        <input type="submit" name="submit" value="Vote" />
      </li>
    </ul>
  </form>
  {% else %}
    <!-- Print status message -->
    {{ message }}
  {% endif %}
  
  {% if show_ads %}
    <!-- Ad serving code -->
    <div id="bottom_ad_block" data-tech-name="AdSense" data-tech-url="templates/webvote.html#29">
      <script type="text/javascript"><!--
        google_ad_client = "ca-pub-4798992313496993";
        /* Web Voting Content */
        google_ad_slot = "8138165453";
        google_ad_width = 728;
        google_ad_height = 90;
        //-->
      </script>
      <script type="text/javascript"
        src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
      </script>
    </div>
  {% endif %}
  
{% endblock content %}